import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import dragdialog from './common/dragdialog/dragdialog.js'
import collapseSwitch from './common/collapse/collapseSwitch.js'

// 全局配置
import './assets/css/global.less'
import './assets/fonticon/iconfont.css'
import localStorage from './utils/localStorage'
import commonFun from './utils/commonFun'
import http from './config/http'
import '@/permission'

Vue.prototype.$localStorage = localStorage
Vue.prototype.$commonFun = commonFun
Vue.prototype.$http = http

Vue.config.productionTip = false
Vue.prototype.$fileserver = process.env.VUE_APP_FILE_DIR
Vue.prototype.$homeTitle = process.env.VUE_APP_HOME_TITLE
Vue.directive('dialogDrag', dragdialog) // element弹窗可拖拽指令注册
Vue.directive('collapseSwitch', collapseSwitch) // 注册侧边栏抽屉伸缩指令

new Vue({
  router,
  store,
  render: h => h(App),
  created() {
    store.commit('menuListMutations')
  }
}).$mount('#app')
